import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    user_uuid: '',
    yifanshang_game_uuid:'',
    wuxianshang_game_uuid:'',
    quanju_update_uuid:'', //全局修改id
    game_uuid:''
  },
  getters: {
  },
  mutations: {
    SAVEYIFANSHANGUUID(state,payload) {
      state.yifanshang_game_uuid = payload;
      localStorage.yifanshang_game_uuid = payload
    },
    SAVEWUXIANCHIUUID(state,payload) {
      state.wuxianshang_game_uuid = payload;
      localStorage.wuxianshang_game_uuid = payload
    },
    setUser_uuid(state,payload) {
      state.user_uuid = payload;
      localStorage.user_uuid = payload;
    },
    delUser_uuid(state) {
      state.user_uuid = '';
      localStorage.user_uuid = '';
    },
    GAME_UUID(state,payload) {
      state.game_uuid = payload
    },
    QUANJUA_UPDATE_UUID(state, payload) {
      state.quanju_update_uuid = payload
    }
  },
  actions: {
  },
  modules: {
  }
})
